Image classification using a mask image and neural networks

ABSTRACT

Image classification using a generated mask image is performed by generating a mask image that extracts a target area from an input image, extracting an image feature map of the input image by inputting the input image in a first neural network including at least one image feature extracting layer, masking the image feature map by using the mask image, and classifying the input image by inputting the masked image feature map to a second neural network including at least one classification layer.

BACKGROUND

The present disclosure relates to classifying an input image by using amask image. More specifically, the present disclosure relates toclassifying an input image by using a mask image generated from theinput image.

Recently, using a multi-layer neural network has become popular forclassifying or identifying an input image. For example, in the medicalfield, use of multi-layer neural networks has gradually increased fordetecting pneumonias or lung nodules from X-ray images of lungs.

However, current neural networks only output a result (e.g., probabilityor degree of certainty) of detecting a target object within the inputimage as a whole. Current neural networks do not output the area in theinput image where the target object is found. In pneumonia orlung-nodule detection, such neural networks only output a probability ora certainty of the presence of disease in the X-ray image of lungs as awhole. Therefore, users (e.g., doctors or other medical professionals)cannot make sure that the illness is detected in the actual lung area ofthe input image.

SUMMARY

According to some embodiments of the present disclosure, provided is acomputer-implemented method comprising generating a mask image thatextracts a target area from an input image, extracting an image featuremap of the input image by inputting the input image in a first neuralnetwork including at least one image feature extracting layer, maskingthe image feature map by using the mask image, and classifying the inputimage by inputting the masked image feature map to a second neuralnetwork including at least one classification layer. In this way, theinput image can be classified based on information within the targetarea extracted by the mask image.

The generating the mask image may include generating the mask image byusing a third neural network. Therefore, it is possible to generate themask image without implementing a specific image processing algorithm.

The computer-implemented method may further comprise receiving atraining input image and a training mask image, and training the thirdneural network based on the training input image and the training maskimage. In this way, the third neural network can be trained separatelyfrom training the first and second neural networks.

The computer-implemented method may further comprise receiving atraining input image and a training classification, generating atraining mask image that extracts a target area from the training inputimage, and training the first neural network and the second neuralnetwork based on the training input image, the training classification,and the training mask image. In this way, the first and second neuralnetworks can be trained by using the training mask image generated fromthe training input image, and therefore the first neural network can betrained within the portion relating to the target area extracted by thetraining mask image.

The computer-implemented method may further comprise generating asaliency map that shows an area of the input image that affected theclassification of the input image. In this way, the saliency map canshow an area affected to the classification only or mostly in the targetarea in the image.

The input image may be an X-ray image of an organ, and the generatingthe mask image may include extracting an image area corresponding to theorgan from the input image. In this way, it is possible to detect adisease relating to the organ of interest.

According to other embodiments of the present disclosure, provided is acomputer program product for image classification, the computer programproduct comprising a computer readable storage medium having programinstructions embodied therewith, the program instructions executable bya processor to cause the processor to perform operations comprisinggenerating a mask image that extracts a target area from an input image,extracting an image feature map of the input image by inputting theinput image in a first neural network including at least one imagefeature extracting layer, masking the image feature map by using themask image, and classifying the input image by inputting the maskedimage feature map to a second neural network including at least oneclassification layer.

According to other embodiments of the present disclosure, provided is anapparatus comprising one or more processors, and a memorycommunicatively coupled to the one or more processors, wherein thememory comprises instructions that, when executed by the one or moreprocessors, cause the one or more processors to generate a mask imagethat extracts a target area from an input image, extract an imagefeature map of the input image by inputting the input image in a firstneural network including at least one image feature extracting layer,mask the image feature map by using the mask image; and classify theinput image by inputting the masked image feature map to a second neuralnetwork including at least one classification layer.

According to other embodiments of the present disclosure, provided is anapparatus comprising a mask generator configured to generate a maskimage that extracts a target area from an input image, a first neuralnetwork configured to receive the input image and output an imagefeature map of the input image, wherein the first neural networkincludes at least one image feature extracting layer, a masking sectionconfigured to mask the image feature map by using the mask image, and asecond neural network configured to receive the masked image feature mapand output a classification of the input image, wherein the secondneural network includes at least one classification layer.

The summary clause does not necessarily describe all necessary featuresof the embodiments of the present disclosure. Embodiments of the presentdisclosure may also be a sub-combination of the features describedabove.

BRIEF DESCRIPTION OF THE DRAWINGS

The drawings included in the present application are incorporated into,and form part of, the specification. They illustrate embodiments of thepresent disclosure and, along with the description, serve to explain theprinciples of the disclosure. The drawings are only illustrative ofcertain embodiments and do not limit the disclosure.

FIG. 1 shows an apparatus according to some embodiments of the presentdisclosure.

FIG. 2 shows an example of a mask generator according to someembodiments of the present disclosure.

FIG. 3 shows an apparatus according to some embodiments of the presentdisclosure.

FIG. 4 shows an operational flow according to some embodiments of thepresent disclosure.

FIG. 5 shows an operational flow for training a mask generator accordingto some embodiments of the present disclosure.

FIG. 6 shows an operational flow for training a first and second neuralnetwork sections according to some embodiments of the presentdisclosure.

FIG. 7 shows an operational flow for generating a saliency map accordingto some embodiments of the present disclosure.

FIG. 8 shows an example hardware configuration of a computer accordingto some embodiments of the present disclosure.

While the invention is amenable to various modifications and alternativeforms, specifics thereof have been shown by way of example in thedrawings and will be described in detail. It should be understood,however, that the intention is not to limit the invention to theparticular embodiments described. On the contrary, the intention is tocover all modifications, equivalents, and alternatives falling withinthe spirit and scope of the invention.

DETAILED DESCRIPTION

Hereinafter, example embodiments of the present disclosure will bedescribed. The example embodiments shall not limit the disclosure, andthe combinations of the features described in the embodiments are notnecessarily essential to the disclosure.

FIG. 1 shows an apparatus 100 according to some embodiments of thepresent disclosure. Apparatus 100 receives an input image and generatesan output that, as an example, represents a probability that the inputimage can be categorized in a predetermined class. Apparatus 100 mayreceive an X-ray image of an organ. In some embodiments, apparatus 100can receive an X-ray image of a chest and can output a probability of apresence of disease(s) in the lung area. In other embodiments, apparatus100 can be used for categorizing input images in other types of classes(e.g., detecting a defect of products).

Apparatus 100 includes mask generator 110, first neural network section120, masking section 130, and second neural network section 140. Maskgenerator 110 receives an input image and generates a mask image thatextracts a target area from an input image. Mask generator 110 mayextract an image area corresponding to the organ from the input image.In this embodiment, mask generator 110 extracts an image areacorresponding to lungs in the input image.

In some implementations, one or more of the images (e.g., the inputimage and the mask image) are two-dimensional images, which aretwo-dimensional arrays of pixels (x, y) (x=0, 1, . . . , SIZE_(x)−1,where SIZE_(x) corresponds to the size of the image in pixels along thex axis and y=0, 1, . . . , SIZE_(y)−1, where SIZE_(y) corresponds to thesize of the image in pixels along they axis). In other implementations,images can be three-dimensional images. The mask image is an image thatdistinguishes the target area of the input image from irrelevant areasof the input image. In this embodiment, the mask image has pixels eachhaving a pixel value based on an estimated probability (which can berepresented e.g., by 0.8 if the probability is 80%) that the pixel is inthe target area (e.g., lung area). In another embodiment, the mask imagehas pixels in the target area having maximum pixel value (e.g., 1, 2⁸−1,2¹⁶−1, or 1.0) and pixels out of the target area having minimum pixelvalue (e.g., 0 or 0.0).

First neural network section 120 receives the input image, extracts animage feature map of the input image, and outputs the image feature mapof the input image. First neural network section 120 is a first neuralnetwork including at least one image feature extracting layer. The imagefeature map can be an array of features (x, y) (e.g., x=0, 1, . . . ,SIZE_(x)−1, where SIZE_(x) corresponds to the size of the image inpixels along the x axis, and y=0, 1, . . . , SIZE_(y)−1, where SIZE_(y)corresponds to the size of the image in pixels along the y axis), andeach feature can represent characteristics of a corresponding area orsub-image of the input image. An image feature extracting layer receivesthe input image, or in embodiments with more than one image featureextracting layer, an input image feature map having an array structure(two-dimensional array structure in this embodiment) from the precedinglayer, generates an output image feature map having an array structurebased on the input image or the input image feature map from thepreceding layer, and outputs the generated output image feature map to asucceeding layer. The at least one image feature extracting layer mayinclude at least one of a convolution layer or a max pooling layer. Theat least one image feature extracting layer may also include any otherneural network layer (e.g., up-sampling layer, down-sampling layer, andconcatenation layer) that outputs an array of features (x, y).

In embodiments with one or more convolution layers, the convolutionlayer(s) can generate the output image feature map by applying aconvolution operation to the input image or the input image feature map.The convolution layer(s) can calculate each feature (x′, y′) in theoutput image feature map based on a sub-image or an area having a sizeof Nx*Ny (e.g., 2×2, 4×4 and so on) at a location in the input image orthe input image feature map that corresponds to (x′, y′) in the outputimage feature map. For example, the convolution layer can calculate aweighted sum of the pixel values or the feature values in the areahaving the size of Nx*Ny in the input image or the input image featuremap. The feature value at (x′, y′) in the output image feature map isequal to or based on the weighted sum (e.g.,f(Σ_(i)Σ_(j)w_(i,j)v_(i,j)+b) where v_(i,j) is a feature value at (i, j)in a sub-image of the image feature map, w_(i,j) is a weight for thefeature value at (i, j), b is a bias, and f( ) is an output functionsuch as sigmoid function or tan h). The same weight sets are applied toevery sub-image in the input image feature map.

In embodiments with one or more max pooling layers, the max poolinglayer(s) can output, for each feature (x′, y′) in the output imagefeature map, the maximum pixel or feature value in the sub-image or thearea having a size of Nx*Ny at a location in the input image or theinput image feature map that corresponds to (x′, y′) in the output imagefeature map. The max pooling layer reduces the size of the output imagefeature map from the size of the input image or the input image featuremap.

First neural network section 120 may include a plurality of convolutionlayers and max pooling layers. In the embodiment depicted in FIG. 1,first neural network section 120 includes, from upstream to downstream,convolution layer 1 (conv1), max pooling layer 1 (pool1), convolutionlayer 2 (conv2), max pooling layer 2 (pool2), convolution layer 3(conv3), max pooling layer 3 (pool3), convolution layer 4 (conv4), andmax pooling layer 4 (pool4).

Masking section 130 masks the image feature map from first neuralnetwork section 120 by using the mask image from mask generator 110.Masking section 130 outputs a masked image feature map that includesfeature values equal to or similar to the feature values in the targetarea of the image feature map from first neural network section 120, andfeature values equal to 0 (or otherwise reduced) in the irrelevant areasof the image feature map.

Second neural network section 140 inputs the masked image feature mapand classifies the input image. Second neural network section 140 is asecond neural network including at least one classification layer. Eachclassification layer of the at least one classification layer may be afull-connection layer. In this embodiment, second neural network section140 includes two full connection layers fc1 and fc2. Fc1 has aconnection having a trainable weight to every feature of the maskedimage feature map. Fc2 has a connection having a trainable weight toevery neuron in fc1.

Second neural network section 140 outputs a classification or anidentification of the input image. At least one neuron of the last layerin second neural network section 140 outputs a probability or acertainty of the presence or the absence of a predetermined object inthe input image. For example, second neural network section 140 mayoutput a probability or a certainty of the presence or the absence of apredetermined disease of an organ in the X-ray image of the organ. Insuch an embodiment, second neural network section 140 can output aprobability or certainty of the presence of pneumonia or a nodule.

In this disclosure, first neural network section 120 and second neuralnetwork section 140 are explained as different neural networkssequentially connected by masking section 130. However, first neuralnetwork section 120, masking section 130, and second neural networksection 140 can be construed as one neural network including imagefeature extracting layers of first neural network section 120, maskinglayer of masking section 130, and classification layers of second neuralnetwork section 140.

In some embodiments, apparatus 100 further includes saliency mapgenerator 150. Saliency map generator 150 generates a saliency map thatshows an area of the input image that affected the classification of theinput image. In some embodiments, saliency map generator 150 generates asaliency map based on the output of second neural network section 140and the result of a back-propagation obtained from conv4 in first neuralnetwork section 120. In some embodiments, the saliency map shows thedegree of affection of each area in the input image by changing at leastone of brightness or colors based on the degree of affection.

In some embodiments, apparatus 100 can mask out the irrelevant area inthe input image by applying the mask image to the image feature map fromfirst neural network section 120, and classify the input image withinthe target area extracted from mask generator 110. If apparatus 100masks the input image based on the mask image and then sends the maskedinput image to first neural network section 120, first neural networksection 120 may output the image feature map having incorrect featurevalues near the borders of the target area. To minimize this problem,apparatus 100 can apply the mask image to the image feature map outputfrom the last image feature extracting layer in the layers of firstneural network section 120, masking section 130, and second neuralnetwork section 140. In some embodiments, masking section 130 can beplaced after at least one image feature extracting layer to reduce thisproblem.

In some embodiments, apparatus 100 can generate a saliency map based onthe masked image feature map from masking section 130. Therefore, thesaliency map can show an area within or mostly within the target area inthe image that is affected the classification.

FIG. 2 shows an example of a mask generator 110 according to someembodiments of the present disclosure. In this example, mask generator110 is a third neural network that generates the mask image. Maskgenerator 110 of this figure includes a plurality of image featureextracting layers including at least one of a convolution layer or a maxpooling layer. Mask generator 110, as depicted, includes, from upstreamto downstream, convolution layer 1 (conv1), convolution layer 2 (conv2),max pooling layer 1 (pool1), convolution layer 3 (conv3), convolutionlayer 4 (conv4), max pooling layer 2 (pool2), convolution layer 5(conv5), up-sampling layer 1 (upsample1), convolution layer 6 (conv6),convolution layer 7 (conv7), concatenate layer 1 (concatenate1),convolution layer 8 (conv8), up-sampling layer 2 (upsample2),convolution layer 9 (conv9), concatenate layer 2 (concatenate2),convolution layer 10 (conv10), convolution layer 11 (conv11), and maxpooling layer 4 (pool4).

Up-sampling layer 1 and up-sampling layer 2 conduct an up-sampling tothe image feature map from the previous layer and output the up-sampledimage feature map to the next layer. By up-sampling, the size (SIZE_(x)and/or SIZE_(y)) of the image feature map is increased.

Concatenate layer 1 concatenates the image feature map from convolutionlayer 4 and the image feature map from convolution layer 7. Morespecifically, concatenate layer 1 outputs the image feature map fromconvolution layer 4 together with the image feature map from convolutionlayer 7 to convolution layer 8. Therefore, convolution layer 8 cangenerate the image feature map for the next layer based on both imagefeature maps. Similarly, concatenate layer 2 concatenates the imagefeature map from convolution layer 2 and the image feature map fromconvolution layer 9.

Max pooling layer 4 resizes the size of the image feature map fromconvolution layer 11 to adjust the size of the image feature map fromconvolution layer 11 to the size of the image feature map output fromfirst neural network section 120. The resized image feature map is usedas a mask image.

FIG. 2 depicts an example embodiment of mask generator 110 with thenumbers, types, and connections of various layers as shown. Manyembodiments can exist using different numbers, types, and connections oflayers can exist and be used in accordance with the principles describedin this disclosure.

FIG. 3 shows an apparatus 300 according to some embodiments of thepresent disclosure. Apparatus 300 includes mask generator 110 (or thirdneural network section), first neural network section 120, maskingsection 130, second neural network section 140, and saliency mapgenerator 150 of apparatus 100. Mask generator 110, first neural networksection 120, masking section 130, and second neural network section 140are the same or similar to the corresponding components having the samereference numbers in FIG. 1, as discussed above. In some embodiments,apparatus 300 further includes overlaying section 360 and displayingsection 370.

Overlaying section 360 receives the saliency map from saliency mapgenerator 150 and the input image, and overlays the saliency map on theinput image to obtain a display image. Displaying section 370 outputsthe display image and the output from second neural network section 140to a display device to show the input image, saliency map, and theresult of classification.

In FIG. 3, apparatus 300 further includes first training section 380 andsecond training section 390. First training section 380 receivestraining data including one or more sets of a training input image and atraining mask image, and trains mask generator 110 (the third neuralnetwork section) based on the one or more sets of the training inputimage and the training mask image. For example, the training input imagecan be an X-ray image of a chest, and the training mask image for thistraining input image can be prepared by a doctor or medical staff bymarking (such as encircling) the lung areas in the input image such thatfirst training section 380 can train the mask generator 110 to constructmasks of lung areas. In other implementations, the training mask imagecan be calculated by using any other image processing software insteadof using input from a doctor or medical staff.

Second training section 390 receives a training input image and atraining classification and trains the first neural network and thesecond neural network. In more detail, second training section 390 sendsthe training input image to mask generator 110 and mask generator 110generates a training mask image that extracts a target area from thetraining input image. Mask generator 110 sends the training mask imageto masking section 130. Second training section 390 trains the firstneural network (first neural network section 120) and the second neuralnetwork (second neural network section 140) based on the training inputimage, the training classification, and the training mask image.

FIG. 4 shows an operational flow according to some embodiments of thepresent disclosure. The operations of this figure can be performed by,for example, apparatus 100 or apparatus 300 and the components that wereexplained in reference to FIG. 1 through 3. While the operational flowof this figure will be explained in reference to apparatus 300 and itscomponents, the operational flow can be performed by other apparatushaving different components as well.

At 400 (400), first training section 380 trains mask generator 110 aswill be explained in more detail in reference to FIG. 5. First trainingsection 380 may initialize the trainable parameters (e.g., weights andbiases) in mask generator 110 based on random values or using othersources of initial values. At 410, second training section 390 trainsfirst neural network (NN) section 120 and second neural network (NN)section 140 as will be explained in more detail in reference to FIG. 6.Second training section 390 may initialize the trainable parameters(e.g., weights and biases) in first neural network section 120 andsecond neural network section 140 based on random values or using othersources of initial values.

At 420, apparatus 300 receives an input image of interest. At 430, maskgenerator 110 generates a mask image that extracts a target area fromthe input image of interest. Mask generator 110 receives the input imageof interest and propagates and converts the input image of interestthrough the layers (e.g., conv1, conv2, pool1, . . . , conv11, and pool4in FIG. 2) to obtain the mask image. Mask generator 110, which has beentrained in 400, outputs the mask image suitable for extracting a targetarea (e.g., target organ, such as a lung) from the input image ofinterest.

At 440, first neural network section 120 extracts an image feature mapof the input image of interest, and outputs an image feature map of theinput image of interest. First neural network section 120 receives theinput image of interest and propagates and converts the input image ofinterest through the layers (e.g., conv1, pool1, . . . , and pool4 inFIG. 1) to obtain the image feature map output from the last layer infirst neural network section 120 (i.e., pool4 in FIG. 1). In someembodiments, first neural network section 120 extracts two or more imagefeature maps, each of which are assigned to different potentialfeatures. More specifically, each layer (conv1 to pool4) in FIG. 1 mayhave a plurality of layers, each of which are for calculating an imagefeature map for a different potential feature type at the same stage. Ifeach convolution layer at the same stage is initialized based on randomvalues, then each convolution layer is gradually trained to output animage feature map different from that of a different convolution layerat the same stage (e.g., a first convolution layer is trained to reactto a particular shape A, and a second convolution layer at the samestage is trained to react to a different shape B). In this disclosure,each layer at the same stage or each feature type is named “a channel.”

At 450, masking section 130 masks the image feature map from firstneural network section 120 by using the mask image from mask generator110 generated at 430. If first neural network section 120 outputs two ormore image feature maps for different channels, then masking section 130masks each of the two or more image feature maps by using the same maskimage. In some embodiments, masking section 130 multiplies each featurevalue in the image feature map and corresponding mask value in the maskimage to obtain the masked feature value. In other embodiments, maskingsection 130 sets 0 to each feature value if the corresponding mask valueequals to 0 or the corresponding mask value is less than a threshold.

At 460, second neural network section 140 inputs the masked imagefeature map and classifies the input image of interest. Second neuralnetwork section 140 receives the masked image feature map from maskingsection 130 and propagates and converts the masked image feature mapthrough the layers (e.g., fc1 and fc2 in FIG. 1) to obtain theclassification output from the last layer in second neural networksection 140. If masking section 130 outputs two or more image featuremaps for different channels, then second neural network section 140classifies the input image of interest based on these two or more imagefeature maps.

At 470, saliency map generator 150 generates a saliency map as will beexplained in reference to FIG. 7. At 480, overlaying section 360overlays the saliency map from saliency map generator 150 on the inputimage of interest to obtain a display image. In some embodiments,overlaying section 360 draws the saliency map as a transparent orsemi-transparent image over the input image of interest. In otherembodiments, overlaying section 360 overlays the saliency map on theinput image of interest by overlaying a contour or outline of thesaliency map on the input image of interest. By this function,overlaying section 360 can enclose the potential target object (e.g., anodule) in the input image of interest. At 490, displaying section 370outputs the display image and the classification of the input image ofinterest to a display device and controls the display device to displaythem to a user of apparatus 300.

In some embodiments, apparatus 300 can make sure that the target objectis detected only in the target area by masking the image feature mapfrom first neural network section 120 by using the mask image from maskgenerator 110. By generating the saliency map based on the masked imagefeature map, apparatus 300 can indicate the area in the input image ofinterest where the target object is located and therefore theclassification is affected.

FIG. 5 shows an operational flow for training a mask generator accordingto some embodiments of the present disclosure. The operational flow ofthis figure is a detailed example of 400 in FIG. 4. The operations ofthis figure can be performed by, for example, apparatus 100 or apparatus300 and the components that were explained in reference to FIG. 1through 3. While the operational flow of this figure will be explainedin reference to apparatus 300 and its components, the operational flowcan be performed by other apparatus having different components as well.

At 500, first training section 380 receives training data including oneor more sets of a training input image and a training mask image. At510, first training section 380 trains saliency map generator 150 (thethird neural network) based on the one or more sets of the traininginput image and the training mask image. For example, for each set ofthe training input image and the training mask image, first trainingsection 380 trains the third neural network shown in FIG. 2. In thistraining, first training section 380 updates trainable parameters ofmask generator 110 including weights, each of which can be assignedbetween a neuron in a layer and a neuron in the next layer, and biasesof neurons. First training section 380 updates the trainable parametersto decrease or minimize the difference between the training mask imageand a mask image generated by mask generator 110 based on the traininginput image.

This training can be done by back-propagating the difference (or error)between the training mask image and the generated mask image from thelast layer to the first layer in mask generator 110 and updating thetrainable parameters in each layer to decrease the difference at eachlayer. In some embodiments, first training section 380 uses each set ofthe training image and the training mask image two or more times torepeat updating the trainable parameters of mask generator 110 andminimize the differences. In some embodiments, this can occur until athreshold value is reached.

FIG. 6 shows an operational flow for training first and second neuralnetwork sections according to some embodiments of the presentdisclosure. The operational flow of this figure is a detailed example of410 in FIG. 4. The operations of this figure can be performed by, forexample, apparatus 100 or apparatus 300 and the components that wereexplained in reference to FIG. 1 through 3. While the operational flowof this figure will be explained in reference to apparatus 300 and itscomponents, the operational flow can be performed by other apparatushaving different components as well.

At 600, second training section 390 receives training data including oneor more sets of a training input image and a training classification. At610, second training section 390 sends each training input image to maskgenerator 110. Mask generator 110 generates a training mask image thatextracts a target area from each training input image. Mask generator110 sends the training mask image to masking section 130.

At 620, second training section 390 trains first neural network section120 and second neural network section 140 based on the training inputimage, the training classification, and the training mask image. Forexample, for each set of the training input image, the training maskimage from mask generator 110, and the training classification, secondtraining section 390 trains first neural network section 120 and secondneural network section 140 (or a neural network including first neuralnetwork section 120, masking section 130, and second neural networksection 140). In this training, second training section 390 updatestrainable parameters of the first neural network section 120 and secondneural network section 140 including weights each of which can beassigned between a neuron in a layer and a neuron in the next layer, andbiases of neurons. Second training section 390 updates the trainableparameters to decrease or minimize the difference between the trainingclassification and a classification generated by first neural networksection 120, masking section 130, and second neural network section 140based on the training input image and the training mask image.

This training can be done by back-propagating the difference (or error)between the training classification and the generated classificationfrom the last layer to the first layer in first neural network section120, masking section 130, and second neural network section 140, andupdating the trainable parameters in each layer to decrease thedifference at each layer. When back-propagating the difference fromsecond neural network section 140 to first neural network section 120,masking section 130 masks the difference (array of difference values) byusing the training mask image. Therefore, masking section 130 propagatesthe difference values within the target area to first neural networksection 120, but masking section 130 does not propagate the differencevalues (or propagate reduced difference values) in irrelevant areas. Inthis way, second training section 390 can train first neural networksection 120 based on the difference values within the target area, andsecond training section 390 can reduce the influence of the differencevalues in the irrelevant areas on training first neural network section120.

FIG. 7 shows an operational flow for generating a saliency map accordingto some embodiments of the present disclosure. The operational flow ofthis figure is a detailed example of 470 in FIG. 4. The operations ofthis figure can be performed by, for example, apparatus 100 or apparatus300 and the components that were explained in reference to FIG. 1through 3. While the operational flow of this figure will be explainedin reference to apparatus 300 and its components, the operational flowcan be performed by other apparatus having different components as well.

At 700, saliency map generator 150 receives the output of second neuralnetwork section 140. The output of second neural network section 140 isa classification of the input image. In one embodiment, theclassification includes one or more probabilities each of which is aprobability that the input image falls into a certain class. Forexample, the classification includes a first probability that the inputimage contains a nodule image in the lung area, and a second probabilitythat the input image contains pneumonia image.

In this embodiment, saliency map generator 150 calculates a loss of apredetermined class (e.g., class M in this figure). For example, ifsaliency map generator 150 is generating a saliency map relating to thepresence of a nodule, saliency map generator 150 calculates a loss of aclass relating to the presence of a nodule. Saliency map generator 150can calculate the loss based on the probability of the predeterminedclass from second neural network section 140 and a probability of 1.0(or 100%). Saliency map generator 150 can use a predetermined lossfunction such as squared error to calculate the loss. For example, ifthe probability of the presence of a nodule is 93%, the loss iscalculated to be (100%−93%)². In other implementations, saliency mapgenerator 150 can use a different loss function or can use thedifference between the probability of 100% and the probability fromsecond neural network section 140.

At 710, saliency map generator 150 calculates a gradient map for eachchannel of a predetermined layer. In more detail, second neural networksection 140 executes a back-propagation to propagate the differencebetween the probability of 1.0 and the probability from second neuralnetwork section 140. In some embodiments, second neural network section140 outputs an array of the differences (x, y) to masking section 130,and masking section 130 masks the array of the differences (x, y) basedon the mask image from mask generator 110. In one implementation, firstneural network section 120 can further execute a back-propagation topropagate the differences from the last layer of first neural networksection 120 to a predetermined layer (e.g., conv4 in FIG. 1).

By this back-propagation, saliency map generator 150 can obtaindifferences of features at each location (x, y) in the predeterminedlayer (an image feature extracting layer) corresponding to thedifference between the probability of the predetermined class and aprobability of 1.0. Saliency map generator 150 calculates a loss at eachlocation (x, y) in the predetermined layer by using the same lossfunction. The ratio of the loss at the output of second neural networksection 140 and the loss of feature at (x, y) at the predetermined layeris a “gradient” at (x, y) at the predetermined layer. An array of thegradient at (x, y) can be referred to as “a gradient map.” Each gradientrepresents the degree of importance of feature value at (x, y) in theimage feature map for determining the probability of the predeterminedclass. In cases where the predetermined layer has two or more channels,saliency map generator 150 calculates a gradient map for each channel.

At 720, saliency map generator 150 calculates a weight w for eachgradient map in the predetermined layer. In some embodiments, saliencymap generator 150 can calculate the weight w as an average of thegradients in the gradient map. In some embodiments, the weight w can becalculated as a sum instead. The weight w represents a degree ofimportance of each gradient map or each channel for determining theprobability of the predetermined class.

At 730, saliency map generator 150 calculates a weighted sum map of theimage feature maps in the predetermined layer based on the weight w foreach channel. By this calculation, saliency map generator 150 mergesfeatures (x, y) of channels based on the importance of each channel andobtains a scalar value that reflects the degree of influence to theprobability of the predetermined class.

At 740, saliency map generator 150 calculates a ReLU (Rectified LinearUnit) of the weighted sum map. ReLU(X) is equal to X if X>0 and 0 ifX≤0. By calculating the ReLU of the weighted sum map, negative values inthe weighted sum map are changed to 0. Therefore, scalar values in theweighted sum map positively influenced for determining the probabilityof the predetermined class are maintained while scalar values in theweighted sum map that negatively influenced the determination are set to0.

At 750, saliency map generator 150 normalizes the map resulting fromReLU at 740 to obtain the saliency map. In this way, saliency mapgenerator 150 can generate a saliency map that has higher values in anarea of the input image that is affected the classification of thepredetermined class and has lower values in an area of the input imagethat is not affected the classification of the predetermined class.

In some embodiments, saliency map generator 150 adds colors to thesaliency map. For example, saliency map generator 150 assigns red tohigher values in the saliency map, yellow to the middle values in thesaliency map, green to lower values in the saliency map, and colorlessand/or transparent to near 0 values in the saliency map.

FIG. 8 shows an example hardware configuration of a computer 1200 inwhich aspects of the present disclosure may be wholly or partlyembodied. A program that is installed in the computer 1200 can cause thecomputer 1200 to function as or perform operations associated withapparatuses of the embodiments of the present disclosure (includingapparatus 100 and apparatus 300) or one or more sections thereof, and/orcause the computer 1200 to perform processes of the embodiments of thepresent disclosure or steps thereof. Such a program may be executed bythe CPU 1212 to cause the computer 1200 to perform certain operationsassociated with some or all of the blocks of flowcharts and blockdiagrams described herein.

The computer 1200 according to the present embodiment includes a CPU1212, a RAM 1214, a graphics controller 1216, and a display device 1218,which are mutually connected by a host controller 1210. The computer1200 also includes input/output units such as a communication interface1222, a hard disk drive 1224, and a DVD-ROM drive 1226, which areconnected to the host controller 1210 via an input/output controller1220. The computer also includes legacy input/output units such as a ROM1230 and a keyboard 1242, which are connected to the input/outputcontroller 1220 through an input/output chip 1240.

The CPU 1212 operates according to programs stored in the ROM 1230 andthe RAM 1214, thereby controlling each unit. The graphics controller1216 obtains image data generated by the CPU 1212 on a frame buffer orthe like provided in the RAM 1214 or in itself and causes the image datato be displayed on the display device 1218.

The communication interface 1222 communicates with other electronicdevices via a network 1250. The hard disk drive 1224 stores programs anddata used by the CPU 1212 within the computer 1200. The DVD-ROM drive1226 reads the programs or the data from the DVD-ROM 1201 and providesthe hard disk drive 1224 with the programs or the data via the RAM 1214.

The ROM 1230 stores therein a boot program or the like executed by thecomputer 1200 at the time of activation, and/or a program depending onthe hardware of the computer 1200. The input/output chip 1240 may alsoconnect various input/output units via a parallel port, a serial port, akeyboard port, a mouse port, and the like to the input/output controller1220.

A program can be provided by computer readable media such as the DVD-ROM1201. The program can be read from the computer readable media,installed into the hard disk drive 1224, RAM 1214, or ROM 1230, whichare also examples of computer readable media, and executed by the CPU1212. The information processing described in these programs is readinto the computer 1200, resulting in cooperation between a program andthe above-mentioned various types of hardware resources. An apparatus ormethod may be constituted by realizing the operation or processing ofinformation in accordance with the usage of the computer 1200.

For example, when communication is performed between the computer 1200and an external device, the CPU 1212 may execute a communication programloaded onto the RAM 1214 to instruct communication processing to thecommunication interface 1222, based on the processing described in thecommunication program. The communication interface 1222, under controlof the CPU 1212, reads transmission data stored on a transmissionbuffering region provided in a recording medium such as the RAM 1214,the hard disk drive 1224, or the DVD-ROM 1201, and transmits the readtransmission data to a network or writes reception data received from anetwork to a reception buffering region or the like provided on therecording medium.

In addition, the CPU 1212 may cause all or a necessary portion of a fileor a database to be read into the RAM 1214, the file or the databasehaving been stored in an external recording medium such as the hard diskdrive 1224, the DVD-ROM drive 1226 (DVD-ROM 1201), etc., and performvarious types of processing on the data on the RAM 1214. The CPU 1212may then write back the processed data to the external recording medium.

Various types of information, such as various types of programs, data,tables, and databases, may be stored in the recording medium to undergoinformation processing. The CPU 1212 may perform various types ofprocessing on the data read from the RAM 1214, which includes varioustypes of operations, processing of information, condition judging,conditional branch, unconditional branch, search/replace of information,etc., as described throughout this disclosure and designated by aninstruction sequence of programs and writes the result back to the RAM1214. In addition, the CPU 1212 may search for information in a file, adatabase, etc., in the recording medium. For example, when a pluralityof entries, each having an attribute value of a first attributeassociated with an attribute value of a second attribute, are stored inthe recording medium, the CPU 1212 may search for an entry matching thecondition whose attribute value of the first attribute is designated,from among the plurality of entries, and read the attribute value of thesecond attribute stored in the entry, thereby obtaining the attributevalue of the second attribute associated with the first attributesatisfying the predetermined condition.

The above-explained program or software modules may be stored in thecomputer readable media on or near the computer 1200. In addition, arecording medium such as a hard disk or a RAM provided in a serversystem connected to a dedicated communication network or the Internetcan be used as the computer readable media, thereby providing theprogram to the computer 1200 via the network 1250.

While the embodiments of the present disclosure have been described, thetechnical scope of the disclosure is not limited to the above describedembodiments. It will be apparent to persons skilled in the art thatvarious alterations and improvements can be added to the above-describedembodiments. It should also apparent from the scope of the claims thatthe embodiments added with such alterations or improvements are withinthe technical scope of the disclosure.

The operations, procedures, steps, and stages of each process performedby an apparatus, system, program, and method shown in the claims,embodiments, or diagrams can be performed in any order as long as theorder is not indicated by “prior to,” “before,” or the like and as longas the output from a previous process is not used in a later process.Even if the process flow is described using phrases such as “first” or“next” in the claims, embodiments, or diagrams, it does not necessarilymean that the process must be performed in this order.

The present invention may be a system, a method, and/or a computerprogram product at any possible technical detail level of integration.The computer program product may include a computer readable storagemedium (or media) having computer readable program instructions thereonfor causing a processor to carry out aspects of the present invention.

The computer readable storage medium can be a tangible device that canretain and store instructions for use by an instruction executiondevice. The computer readable storage medium may be, for example, but isnot limited to, an electronic storage device, a magnetic storage device,an optical storage device, an electromagnetic storage device, asemiconductor storage device, or any suitable combination of theforegoing. A non-exhaustive list of more specific examples of thecomputer readable storage medium includes the following: a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), a static random access memory (SRAM), a portablecompact disc read-only memory (CD-ROM), a digital versatile disk (DVD),a memory stick, a floppy disk, a mechanically encoded device such aspunch-cards or raised structures in a groove having instructionsrecorded thereon, and any suitable combination of the foregoing. Acomputer readable storage medium, as used herein, is not to be construedas being transitory signals per se, such as radio waves or other freelypropagating electromagnetic waves, electromagnetic waves propagatingthrough a waveguide or other transmission media (e.g., light pulsespassing through a fiber-optic cable), or electrical signals transmittedthrough a wire.

Computer readable program instructions described herein can bedownloaded to respective computing/processing devices from a computerreadable storage medium or to an external computer or external storagedevice via a network, for example, the Internet, a local area network, awide area network and/or a wireless network. The network may comprisecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers and/oredge servers. A network adapter card or network interface in eachcomputing/processing device receives computer readable programinstructions from the network and forwards the computer readable programinstructions for storage in a computer readable storage medium withinthe respective computing/processing device.

Computer readable program instructions for carrying out operations ofthe present invention may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, configuration data for integrated circuitry, oreither source code or object code written in any combination of one ormore programming languages, including an object oriented programminglanguage such as Smalltalk, C++, or the like, and procedural programminglanguages, such as the “C” programming language or similar programminglanguages. The computer readable program instructions may executeentirely on the user's computer, partly on the user's computer, as astand-alone software package, partly on the user's computer and partlyon a remote computer or entirely on the remote computer or server. Inthe latter scenario, the remote computer may be connected to the user'scomputer through any type of network, including a local area network(LAN) or a wide area network (WAN), or the connection may be made to anexternal computer (for example, through the Internet using an InternetService Provider). In some embodiments, electronic circuitry including,for example, programmable logic circuitry, field-programmable gatearrays (FPGA), or programmable logic arrays (PLA) may execute thecomputer readable program instructions by utilizing state information ofthe computer readable program instructions to personalize the electroniccircuitry, in order to perform aspects of the present invention.

Aspects of the present invention are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer readable program instructions.

These computer readable program instructions may be provided to aprocessor of a general purpose computer, special purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions, which execute via the processor of the computeror other programmable data processing apparatus, create means forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks. These computer readable program instructionsmay also be stored in a computer readable storage medium that can directa computer, a programmable data processing apparatus, and/or otherdevices to function in a particular manner, such that the computerreadable storage medium having instructions stored therein comprises anarticle of manufacture including instructions which implement aspects ofthe function/act specified in the flowchart and/or block diagram blockor blocks.

The computer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the blocks may occur out of theorder noted in the Figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts or carry out combinations of special purpose hardwareand computer instructions.

The descriptions of the various embodiments of the present disclosurehave been presented for purposes of illustration, but are not intendedto be exhaustive or limited to the embodiments disclosed. Manymodifications and variations will be apparent to those of ordinary skillin the art without departing from the scope and spirit of the describedembodiments. The terminology used herein was chosen to explain theprinciples of the embodiments, the practical application or technicalimprovement over technologies found in the marketplace, or to enableothers of ordinary skill in the art to understand the embodimentsdisclosed herein.

What is claimed is:
 1. A computer-implemented method for imageclassification comprising: generating a mask image that extracts atarget area from an input image; extracting an image feature map of theinput image by inputting the input image into a first neural networkincluding at least one image feature extracting layer; masking the imagefeature map by using the mask image; and classifying the input image byinputting the masked image feature map into a second neural networkincluding at least one classification layer.
 2. The computer-implementedmethod of claim 1, wherein the at least one image feature extractinglayer includes at least one of a convolution layer or a max poolinglayer.
 3. The computer-implemented method of claim 1, wherein eachclassification layer of the at least one classification layer is afull-connection layer.
 4. The computer-implemented method of claim 1,wherein the generating the mask image includes generating the mask imageby using a third neural network.
 5. The computer-implemented method ofclaim 4, wherein the third neural network includes at least one of aconvolution layer or a max pooling layer.
 6. The computer-implementedmethod of claim 4, further comprising: receiving a training input imageand a training mask image; and training the third neural network basedon the training input image and the training mask image.
 7. Thecomputer-implemented method of claim 1, wherein the extracting includesextracting two or more image feature maps, and wherein the maskingincludes masking each of the two or more image feature maps by using themask image.
 8. The computer-implemented method of claim 1, furthercomprising: receiving a training input image and a trainingclassification; generating a training mask image that extracts a targetarea from the training input image; and training the first neuralnetwork and the second neural network based on the training input image,the training classification, and the training mask image.
 9. Thecomputer-implemented method of claim 1, further comprising generating asaliency map that shows an area of the input image that affected theclassification of the input image.
 10. The computer-implemented methodof claim 9, further comprising overlaying the saliency map on the inputimage to obtain a display image.
 11. The computer-implemented method ofclaim 10, wherein the overlaying includes overlaying a contour of thesaliency map on the input image to obtain the display image.
 12. Thecomputer-implemented method of claim 1, wherein the input image is anX-ray image of an organ, and the generating the mask image includesextracting an image area corresponding to the organ from the inputimage.
 13. A computer program product for image classification, thecomputer program product comprising a computer readable storage mediumhaving program instructions embodied therewith, the program instructionsexecutable by a processor to cause the processor to perform operationscomprising: generating a mask image that extracts a target area from aninput image; extracting an image feature map of the input image byinputting the input image into a first neural network including at leastone image feature extracting layer; masking the image feature map byusing the mask image; and classifying the input image by inputting themasked image feature map into a second neural network including at leastone classification layer.
 14. The computer program product of claim 13,wherein the generating the mask image includes generating the mask imageby using a third neural network.
 15. The computer program product ofclaim 14, the operations further comprising: receiving a training inputimage and a training mask image; and training the third neural networkbased on the training input image and the training mask image.
 16. Thecomputer program product of claim 13, the operations further comprising:receiving a training input image and a training classification;generating a training mask image that extracts a target area from thetraining input image; and training the first neural network and thesecond neural network based on the training input image, the trainingclassification, and the training mask image.
 17. The computer programproduct of claim 13, the operations further comprising generating asaliency map that shows an area of the input image that affected theclassification of the input image.
 18. The computer program product ofclaim 13, wherein the input image is an X-ray image of an organ, and thegenerating the mask image includes extracting an image areacorresponding to the organ from the input image.
 19. An apparatus forimage classification comprising: one or more processors; and a memorycommunicatively coupled to the one or more processors, wherein thememory comprises instructions that, when executed by the one or moreprocessors, cause the one or more processors to: generate a mask imagethat extracts a target area from an input image; extract an imagefeature map of the input image by inputting the input image into a firstneural network including at least one image feature extracting layer;mask the image feature map by using the mask image; and classify theinput image by inputting the masked image feature map into a secondneural network including at least one classification layer.
 20. Theapparatus of claim 19, wherein the generating the mask image includesgenerating the mask image by using a third neural network.
 21. Theapparatus of claim 20, the instructions further cause the processor orthe programmable circuitry to: receive a training input image and atraining mask image; and train the third neural network based on thetraining input image and the training mask image.
 22. The apparatus ofclaim 19, the instructions further cause the one or more processors to:receive a training input image and a training classification; generate atraining mask image that extracts a target area from the training inputimage; and train the first neural network and the second neural networkbased on the training input image, the training classification, and thetraining mask image.
 23. The apparatus of claim 19, the instructionsfurther cause the one or more processors to generate a saliency map thatshows an area of the input image that affected the classification of theinput image.
 24. The apparatus of claim 19, wherein the input image isan X-ray image of an organ, and the generating the mask image includesextracting an image area corresponding to the organ from the inputimage.
 25. An apparatus comprising: a mask generator configured togenerate a mask image that extracts a target area from an input image; afirst neural network configured to receive the input image and output animage feature map of the input image, wherein the first neural networkincludes at least one image feature extracting layer; a masking sectionconfigured to mask the image feature map by using the mask image; and asecond neural network configured to receive the masked image feature mapand output a classification of the input image, wherein the secondneural network includes at least one classification layer.